package com.fly.r2dbc.basics.entity;

import org.springframework.data.annotation.Id;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Oliver Gierke
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Customer
{
    @Id
    Long id;
    
    String firstname;
    
    String lastname;
    
    public Customer(String firstName, String lastName)
    {
        this.firstname = firstName;
        this.lastname = lastName;
    }
    
    public boolean hasId()
    {
        return id != null;
    }
    
}
